def print_info(name, title="", gender=True):
    gender_text = "男生"

    if not gender:
        gender_text = "女生"

    print("%s%s 是 %s" % (title, name, gender_text))


print_info("小明")
print_info("老王", title="班长")
print_info("小美", '学习委员',False)
print('-'*50)
print_info("小美", gender=False,title='学习委员')


def demo2(*args, **kwargs):
    print(f'demo2-{args}')
    print(f'demo2-{kwargs}')


def demo(*args, **kwargs):
    print(args)
    print(kwargs)
    demo2(*args,**kwargs)
    print(*args)
    # print(**kwargs)          错误！无法直接print


demo(1, 2, 3, 4, name='小明', age=19)





class dog:
    def __init__(self, name,color):
        self.name = name
        self.color = color
    def bark(self):
        print(f'{self.name}汪汪叫')
    def Wag(self):
        print(f'{self.name}摇尾巴')


dahung=dog('大黄','yellow')
dahung.bark()
dahung.Wag()
